<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::get('think', function () {
    return 'hello,ThinkPHP6!';
});

Route::group('freightForward', function () {
//    Route::post('article', 'publish.PublishController/publish');
    Route::post('addMsg', 'freightForward.FreightForwardController/addFreightForward');
    Route::get('select', 'freightForward.FreightForwardController/select');
    Route::put('update', 'freightForward.FreightForwardController/update');
    Route::post('del', 'freightForward.FreightForwardController/del');
});


Route::group('channel', function () {
//    Route::post('article', 'publish.PublishController/publish');
    Route::post('add', 'freightForward.ChannelController/add');
    Route::get('select/:forwardId/:page/:limit', 'freightForward.ChannelController/select');
    Route::put('update', 'freightForward.ChannelController/update');
    Route::post('del', 'freightForward.ChannelController/del');
});

Route::group('channelDetail', function () {
//    Route::post('article', 'publish.PublishController/publish');
    Route::post('add', 'freightForward.ChannelDetailController/add');
    Route::post('select', 'freightForward.ChannelDetailController/select');
    Route::get('selectWeight/:channelId', 'freightForward.ChannelDetailController/selectWeight');
    Route::put('update', 'freightForward.ChannelDetailController/update');
    Route::post('del', 'freightForward.ChannelDetailController/delete');
    Route::get('selectHistory/:detailId/:startTime/:endTime/:page/:limit', 'freightForward.ChannelDetailController/selectHistory');
    Route::get('selectHistoryPrice/:detailId/:startTime/:endTime', 'freightForward.ChannelDetailController/selectHistoryPrice');
});

Route::group('excel', function () {
    Route::post('input', 'freightForward.ExcelController/inputData');
});

Route::group('freightCalculate', function () {
    Route::post('calculate', 'freight.FreightCalculateController/calculate');
});
Route::get('test', 'TestController/testExcelInput');